<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
     <html>
        <head>
        <link rel="stylesheet" href="//unpkg.com/layui@2.6.8/dist/css/layui.css">
        <script src="//unpkg.com/layui@2.6.8/dist/layui.js"></script>
        <script>
        function onChange(oid){
            if(window.confirm("是否修改订单状态？")){
                  window.location.href="toChangeState?oid="+oid
            }
        }
        //导航 依赖elment模块
                                                         layui.use('element',function(){
                                                              var element = layui.element;
                                                        })
                                              //加载form模块
                                                                            layui.use("form",function(){
                                                                             var form = layui.form;
                                                                            })
                                                                            form.on('submit(formDemo)', function(data){
                                                                             layer.msg(JSON.stringify(data.field));
                                                                             return false;
              })
        </script>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>订单状态更改页面</title>
        </head>
        <body>
        <div class="layui-layout layui-layout-admin">
                        <div class="layui-header">
                          <div class="layui-logo layui-hide-xs layui-bg-black">旅游管理系统</div>
                          <ul class="layui-nav layui-layout-left">
                            <li class="layui-nav-item layui-show-xs-inline-block layui-hide-sm" lay-header-event="menuLeft">
                                <i class="layui-icon layui-icon-spread-left"></i>
                              </li>
                          </ul>
                    <ul class="layui-nav layui-layout-right">
                        <li class="layui-nav-item layui-hide layui-show-md-inline-block">
                            <a href="javascript:;">
                              <img src="//tva1.sinaimg.cn/crop.0.0.118.118.180/5db11ff4gw1e77d3nqrv8j203b03cweg.jpg" class="layui-nav-img">
                              Admin
                            </a>
                            <dl class="layui-nav-child">
                              <dd><a href="alogOut">退出登录</a></dd>
                            </dl>
                          </li>
                    </ul>
                    <div class="layui-side layui-bg-black">
                        <div class="layui-side-scroll">
                    <ul class="layui-nav layui-nav-tree" lay-filter="test">
                        <li class="layui-nav-item"><a href="javascrript:;">产品管理</a>
                            <dl class="layui-nav-child">
                                <dd><a href="toAdd">产品添加</a></dd>
                                <dd><a href="toUp">产品修改</a></dd>
                                <dd><a href="toDel">产品删除</a></dd>
                                <dd><a href="search">产品查询</a></dd>
                                <dd><a href="toSelectOne">单一产品查询</a></dd>
                            </dl>
                        </li>
                        <li class="layui-nav-item"><a href="javascrript:;">帖子管理</a>
                            <dl class="layui-nav-child">
                                <dd><a href="toDeC">帖子删除</a></dd>
                                <dd><a href="searchC">帖子查询</a></dd>
                                <dd><a href="toSelOC">单一帖子查询</a></dd>
                            </dl>
                        </li>
                        <li class="layui-nav-item"><a href="javascrript:;">用户管理</a>
                            <dl class="layui-nav-child">
                                <dd><a href="toDelete">用户删除</a></dd>
                            </dl>
                        </li>
                        <li class="layui-nav-item">
                            <a href="javascrript:;">用户订单管理</a>
                            <dl class="layui-nav-child">
                                <dd><a href="initDeO">用户订单删除</a></dd>
                                <dd><a href="toSelect">单一用户订单查询</a></dd>
                                <dd><a href="selectAllOrder">查询所有用户订单</a></dd>
                                <dd><a href="initChange">修改用户订单状态</a></dd>
                            </dl>
                        </li>

                    </ul>
                    </div>
                    </div>
                </div>
                </div>
            <div style="width: 1650px;position: relative; left:15%; margin-top: 100px;">
            <h3>订单状态修改</h3>
            <br>
            <br>
            当前订单信息：
            <br>
            <br>
            <table class="layui-table">
            <thread>
                                                     <tr>
                                                     <th>订单编号</th>
                                                     <th>订单时间</th>
                                                     <th>订单总价</th>
                                                     <th>订单状态</th>
                                                     <th>订购者编号</th>
                                                     <th>操作</th>
                                                     </tr>
                            </thread>
                <c:forEach items="${orderlist}" var="orderlist">
                <colgroup>
                                         <col width="200">
                                         <col width="200">
                                         <col>
                                         </colgroup>

                <tbody>
                                         <tr>
                                         <td>${orderlist.oid}</td>
                                         <td>${orderlist.otime}</td>
                                         <td>${orderlist.total}</td>
                                         <td>${orderlist.state}</td>
                                         <td>${orderlist.uid}</td>
                                         <td><button type="button" class="layui-btn layui-btn-danger" onClick="onChange('${orderlist.oid}')">修改</button></td>
                                         </tr>
                                         </tbody>
                                         </c:forEach>
                                         </table>
                         ${msg}
            </div>
            </body>
            </html>